B
Troubleshooting
This section is designed to give you a quick reference point for common problems with their solutions when targeting the Java VM with CodeWarrior. This should be the first place you look before contacting technical support.
Troubleshooting questions and answers cover the following main categories:
This section deals with problems encountered writing Java code using the CodeWarrior development environment.
Problem
The following errors are encountered when building Java applications (depending on which host CodeWarrior is running on, and which VM is being used):
Solution
The common cause of this error is the incorrect entry of the Main Class name in the Java Target panel. Open this panel by choosing Edit >
Target Settings
(where Target is the name of the build target in question), then select Java Target from the settings panels list on the left side of the window. Make sure that the Main Class field matches the name of the main class in your code. Remember that class names are case sensitive.
If this field does match your main class exactly, make sure that you have a virtual machine installed on your computer. CodeWarrior can use the Apple MRJ, Sun JDK 1.1.6 (or higher), and Microsoft Internet Explorer 4.0 as a virtual machine. We include all of these on the CodeWarrior CD(s). You can specify which one you want to use via the Virtual Machine pop-up menu in the Java Target panel. You can also download the latest versions from Apple, Sun or Microsoft.
Problem
This error may be worded in one of the following ways, depending on which host CodeWarrior is running on, and which VM is being used:
Solution
This is usually the result of the class name specified in the applet
HTML tag not matching the actual class name in the Java code. Make sure that the class name in the applet
tag matches the name of the main class in your code. Also be sure that the name of the class file matches the name of the main class. Remember that class names are case sensitive.
Problem
When stepping through Java code, you cannot step into the classes.zip
library by default.
Solution
To debug classes.zip, requires that you switch to the debug version of the library. Locate the supplied Classes_debug.zip
library. It can be found in the following location:
Windows
Metrowerks CodeWarrior\Java Support\Libraries\Classes_debug.zip
Mac OS
Metrowerks CodeWarrior:Java Support:Libraries:Classes_debug.zip
Drag this file into the same group as classes.zip in the project window. And remove the classes.zip file from your project. Now you can debug any class in classes.zip.
If you find you are having problems in this area, please send a bug report to Metrowerks support, support@metrowerks.com
, and that information will be added to this manual in the next release.
This section deals mainly with problems encountered converting older CodeWarrior Java projects to the latest release.
Problem
The Droplet project type was used in previous versions of CodeWarrior to make a "pseudo" stand alone applet. Droplet is no longer supported by CodeWarrior.
Solution
While the Droplet type is no longer supported, you can still make a Stand Alone Java application with CodeWarrior. The CodeWarrior project converter does not convert your project to the new type for you. The best method is to use the StandAlone Applet stationery and create a new project. Then add your Java source files to this project.
See "Standalone Applets for Mac OS" for more information.
Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: support@metrowerks.com
Copyright © 1999, Metrowerks Corp. All rights reserved.
Last updated: May 24, 1999
* Chris Magnuson
* John Roseborough